import {Base} from '@/js/api/base'
import axios from "axios";

export class Order extends Base {
    // constructor(port) {
    //     super(port);
    //     this.$axios = axios.create({
    //         baseURL: 'http://127.0.0.1:30007' + this.port,
    //         timeout: 30000,// 超时 毫秒
    //     })
    // }
    orderList (params, callBack){
        return this.get("/order/order/list", params, callBack)
    }
    orderDetail (params, callBack){
        return this.get("/order/order/detail", params, callBack)
    }
    refundCreate (params, callBack){
        return this.post("/order/refund/create", params, callBack)
    }
    refundList (params, callBack, setting){
        return this.get("/order/refund/list", params, callBack, setting)
    }
    refundDetail (params, callBack){
        return this.get("/order/refund/detail", params, callBack)
    }
    orderFind (params, callBack){
        return this.get("/order/order/find", params, callBack)
    }
    // 账单 列表
    billingList(params, callBack){
        return this.get("/order/billing/list", params, callBack)
    }
    // 账单 创建
    billingCreate(params, callBack){
        return this.post("/order/billing/create", params, callBack)
    }
    // 账单 编辑
    billingEdit(params, callBack){
        return this.post("/order/billing/edit", params, callBack)
    }
    // 账单 详情
    billingDetail(params, callBack){
        return this.get("/order/billing/detail", params, callBack)
    }
    // 账单 状态变更
    billingChangeStatus(params, callBack){
        return this.post("/order/billing/change_status", params, callBack)
    }
}